<?php
	class getRingtoneErrorSearchResultAction extends sfActions{
		public function execute(){
			$errorType 			= makeSafe($this->getRequestParameter("errorType"));
			$checkoutStatus 	= $this->getRequestParameter("checkoutStatus");
			$excutedTimeFrom 	= $this->getRequestParameter("excutedTimeFrom");
			$excutedTimeTo 		= $this->getRequestParameter("excutedTimeTo");
			$adminId 			= $this->getRequestParameter("adminId");
			
			//$updateInfo = $this->getRequestParameter("updateInfo", 0);
			$start 		= $this->getRequestParameter("start", 0);
			$limit 		= $this->getRequestParameter("limit", 10);
			$sort 		= $this->getRequestParameter("sort");
			$dir 		= $this->getRequestParameter("dir");
			$callback 	= $this->getRequestParameter("callback", "");
	
			$result = RingtonePeer::getRingtoneErrorSearchResult($errorType, $checkoutStatus, $sort, $dir, $limit, $start, $excutedTimeFrom, $excutedTimeTo, $adminId);
	
			/*if ($updateInfo)
			{
				$this->__updateSongsInfo($result);
			}*/
			echo $callback . '({"Total":"' . $result->total . '", "Ringtones":' . FastJSON::encode($result->records) . '})';
			exit();
		}
	}
?>